
// 创建一个路由  createRouter
import {createRouter,createWebHistory} from "vue-router"

//引入要呈现的vue页面 src\components\user\user.vue
import User from "../components/sys/User.vue"
import AddUser from "../components/user/AddUser.vue"
import UserTest from "../components/user/UserTest.vue"
import SysConfig from "../components/sys/Syscon.vue"
import Dept from "../components/sys/Dept.vue"
import CreateTable from "../components/table/CreateTable.vue"
import IndexText from "../components/IndexText.vue"
import Login from "../components/login/Login.vue"
import Text from "../components/Text.vue"
import UserManagement from "../components/user/UserManagement.vue"
import TableInfo from "../components/sys/TableInfo.vue"
import MenuManagement from "../components/sys/MenuManagement.vue"
import RoleManagement from "../components/sys/RoleManagement.vue"
import Permission from "../components/sys/Permission.vue"
import Datainterface from "../components/sys/Datainterface.vue"
import FileTest from "../components/sys/FileTest.vue"
import FileList from "../components/sys/FileList.vue"
import MainEdit from "../components/xhs/MainEdit.vue"
import TalkEdit from "../components/xhs/TalkEdit.vue"
import LikeEdit from "../components/xhs/LikeEdit.vue"
import TagEdit from "../components/xhs/TagEdit.vue"
import Following from "../components/xhs/Following.vue"


// import path from "path"

//创建路由器
const router =createRouter({
    history:createWebHistory(),
    
    routes:[
         
        {
            path:"/Login",
            component:Login
        },
         
        {
            path: '/main',
            component: IndexText, // 引入 Home 组件
            children: [
              {
                path: 'home',
                components: {
                    dept: Dept ,
                    user: User ,
                    adduser: AddUser, //默认省略不写name的情况
                    userTest: UserTest,
                    createTable : CreateTable,
                    login :Login,
                    indexText:IndexText,
                    sysConfig:SysConfig,
                    userManagement:UserManagement,
                    tableInfo:TableInfo,
                    menuManagement:MenuManagement,
                    roleManagement:RoleManagement,
                    permission:Permission,
                    datainterface:Datainterface,
                    fileTest:FileTest,
                    fileList:FileList,
                    mainEdit:MainEdit,
                    talkEdit:TalkEdit,
                    likeEdit:LikeEdit,
                    tagEdit:TagEdit,
                    following:Following,
                }
              },
              
            ]
          }
        
        
    ]
})

//路由暴漏出去
export default router
